/**********************************************************
 * AboutFormAction.java.java 
 *
 * Created by Ashutosh
 * Last modified Date: Sep 18, 2008 10:38:02 AM by Ashutosh
 * Revision: <svn revision #> 
 * Version : 0.1
 * Copyright (c) 2008 - 2009 cyberThink Infotech Pvt. Ltd., All rights reserved.
 **********************************************************/
package com.printeverywhere.action;

import org.apache.log4j.Logger;

import com.opensymphony.xwork2.ActionSupport;
import com.printeverywhere.delegator.UserServiceDelegator;
import com.printeverywhere.dto.User;

// TODO: Auto-generated Javadoc
/**
 * The Class AboutFormAction.
 */
public class AccountDetailsAction extends ActionSupport{
	
	/** Logger for this class. */
	private static final Logger logger = Logger.getLogger(AccountDetailsAction.class);
	
	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = 1L;
	
	/** The data. */
	private User user;
	
	@Override
	public String execute() throws Exception {
		if(user == null || user.getId()==null)throw new Exception("No user to view as there was no user id in parameter");
		else{
			user=UserServiceDelegator.getUser(user.getId());
		}
			
		return SUCCESS;
	}

	/**
	 * Save option.
	 * 
	 * @return the string
	 * 
	 * @throws Exception the exception
	 */
	public String save() throws Exception{
		
		return SUCCESS;
	}

	/**
	 * @return the user
	 */
	public User getUser() {
		return user;
	}

	/**
	 * @param user the user to set
	 */
	public void setUser(User user) {
		this.user = user;
	}

	

	
}


